<template>
	
		<el-row :gutter="5">
			<el-col :span="6">
				<xm-phase ref="xmPhase" :xm-product="xmProduct" :sel-project="selProject"  @check-change="onPhaseRowClick" />
			</el-col>
			<el-col :span="18">
				<xm-task-mng :xm-product="xmProduct" :sel-project="selProject" :params="{ntype:'1'}" :parent-task="parentTask" queryScope="plan" subOpType="mng" @batch-add-submit="onBatchAddSubmit" @add-submit="onAddSubmit"/>
			</el-col>
		</el-row>
	
</template>

<script>
	import util from '@/components/mdp-ui/js/util';//全局公共库

	import { mapState } from 'pinia'
import { useUserStore } from '@/store/modules/user'

  	import  XmPhase from '@/views/xm/core/xmTask/XmPhase.vue';//新增界面
 	import  XmTaskMng from '@/views/xm/core/xmTask/XmTaskMng.vue';//新增界面
	export default {

		components: {
			XmPhase,XmTaskMng
		},
        props:['xmProduct','selProject'],//queryScope='plan|task'
		computed: {
		    ...mapState(useUserStore,[
		      'userInfo','roles'
		    ]),


        },
		watch: {

	    },
		data() {
			return {
				parentTask:null,  
			}//end return
		},//end data
		methods: {
			 onPhaseRowClick(task,checked){
				if(checked==true){
					this.parentTask=task
				}else{
					this.parentTask=null
				}
				 
			 },
			 onBatchAddSubmit(){
				this.$refs.xmPhase.refresh()
			 },
			 onAddSubmit(data){

			 }
		},//end method
		mounted() {


		}//end mounted
	}

</script>

<style lang="less" scoped />
